package com.dce.dev.api.controller.message;

import java.util.List;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.dce.dev.api.common.tools.JsonFileTool;
import com.dce.dev.api.common.tools.json.JsonUtils;
import com.dce.dev.api.dto.base.ResultDTO;
import com.dce.dev.api.dto.message.NoticeDTO;
import com.dce.dev.api.dto.message.RemindDTO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 交割信息接口
 */
@RestController
@RequestMapping("/message/")
@Api(value = "后台服务--消息基础功能", description = "后台服务--消息基础功能")
public class MessageController {
	
	@RequestMapping(value = "/getRemindList", method = RequestMethod.POST)
    @ApiOperation(value = "获取提醒列表")
    public ResultDTO<List<RemindDTO>> getRemindList() {
        String strJson = JsonFileTool.readJSON("message/remind.json");
        final List<RemindDTO> dtoRtn = JsonUtils.jsonToPojo(strJson, List.class);
        return ResultDTO.success(dtoRtn,"列表获取成功");
    }
	
	@RequestMapping(value = "/getNoticeList", method = RequestMethod.POST)
    @ApiOperation(value = "获取提醒列表")
    public ResultDTO<List<NoticeDTO>> getNoticeList() {
        String strJson = JsonFileTool.readJSON("message/notice.json");
        final List<NoticeDTO> dtoRtn = JsonUtils.jsonToPojo(strJson, List.class);
        return ResultDTO.success(dtoRtn,"列表获取成功");
    }
	
	
}
